function defaultRoute(pathname, req, res) {
	// write the response
	res.writeHead(200, {
		'Content-Type': 'text/html;charset=utf-8'
	});
	res.write('<h1 style="text-align: center;">404, The Page is Not Found.</h1>');
	res.end();
};

function router(pathname, handler, request, response) {
	handler[pathname] ? handler[pathname](request, response) : defaultRoute(pathname, request, response);
};

exports.router = router;